<template>
    <div class="list">
        <h3>中间层组件-{{ data }}-{{ count }}</h3>
        <ItemCom/>
    </div>
</template>

<script setup lang="ts">
import ItemCom from './ItemCom.vue'

import {inject} from 'vue'

const data=inject('parentData')
const count=inject('count')

</script>

<style scoped lang="less">
.list{
    width: 100%;
    height: 300px;
    background-color: red;
}
</style>